home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / gfx / edit / AmiCAD_2.07.lha / AmiCAD / ARexx / SearchLib.AmiCAD < prev    next >
Text File  |  2000-11-11  |  2KB  |  39 lines

  1. /* Recherche d'un composant dans une bibliothèque
  2.     Version 1.00: 23 Novembre 1998
  3.     Version 1.01: 16 Mars 1999 (correction bug ASKTEXT)
  4.     Version 1.02: 11 Novembre 2000 (localisation anglais/français)
  5. $VER: 1.02 (© R.Florac, 11 Novembre 2000) */
  6.  
  7. options results     /* indispensable pour récupérer le résultat des macros */
  8.  
  9. signal on error     /* pour l'interception des erreurs */
  10. signal on syntax
  11.  
  12. 'LANGUAGE'
  13. if result="français.language" then fr=1
  14. else fr=0
  15.  
  16. if fr=1 then 'ASKTEXT("Quelle est le nom du"+CHR(10)+"composant recherché?"+CHR(10)+"Vous pouvez utiliser les"+CHR(10)+"jokers AmigaDOS pour"+CHR(10)+"spécifier ce nom."+CHR(10)+"Exemples: TRANS#? 74#?244","")'
  17. else 'ASKTEXT("What is the name of the"+CHR(10)+"searched component ?"+CHR(10)+"You can use AmigaDOS"+CHR(10)+"jokers (#?)"+CHR(10)+"to specify this name."+CHR(10)+"Examples: TRANS#? 74#?244","")'
  18. nom=result
  19.  
  20. if nom="" then exit
  21.  
  22. address command
  23. if fr=1 then 'Travail:AmiCAD/SearchLib >CON:100/100/600/200/SearchLib/CLOSE/WAIT/SCREENAmiCAD 'nom' QUIET ALL'
  24. else 'Work:AmiCAD/SearchLib >CON:100/100/600/200/SearchLib/CLOSE/WAIT/SCREENAmiCAD 'nom' QUIET ALL'
  25.  
  26. exit
  27.  
  28. /* Traitement des erreurs, interruption du programme */
  29. syntax:
  30. erreur=RC
  31. if fr=1 then 'MESSAGE("Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  32. else 'MESSAGE("Syntax error"+CHR(10)+"in line 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  33. exit
  34.  
  35. error:
  36. if fr=1 then 'MESSAGE("Erreur en ligne 'SIGL'")'
  37. else 'MESSAGE("Error in line 'SIGL'")'
  38. exit
  39.